Add which-key-init-buffer-hook
authorjustbur <justin@burkett.cc>
Fri, 11 Dec 2015 01:02:58 +0000 (20:02 -0500)
committerjustbur <justin@burkett.cc>
Fri, 11 Dec 2015 01:02:58 +0000 (20:02 -0500)
which-key.el

index 8254b60eb15387f64bf6d55d11f7645c2c952c18..5986ae6af7cf57ff96668d921c16cd5a22bc8853 100644 (file)
@@ -321,6 +321,10 @@ See http://www.gnu.org/software/emacs/manual/html_node/emacs/Modifier-Keys.html"
   :group 'which-key
   :type 'boolean)
 
+;; Hooks
+(defvar which-key-init-buffer-hook '()
+  "Hook run when which-key buffer is initialized.")
+
 ;; Faces
 (defgroup which-key-faces nil
   "Faces for which-key-mode"
@@ -503,7 +507,8 @@ alongside the actual current key sequence when
       (setq-local cursor-type nil)
       (setq-local cursor-in-non-selected-windows nil)
       (setq-local mode-line-format nil)
-      (setq-local word-wrap nil))))
+      (setq-local word-wrap nil)
+      (run-hooks 'which-key-init-buffer-hook))))
 
 (defun which-key--setup ()
   "Initial setup for which-key.